import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/home/home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: Home,
    children: [
      { path: "", redirect: "/home/rabbit" },
      { path: "/home/rabbit", name: "rabbit", component: () => import('../views/rabbit/rabbit.vue') },//首页
      { path: "/home/category", name: "category", component: () => import('../views/category/category.vue') },//分类二级
      { path: "/home/subs", name: "subs", component: () => import('../views/subs/subs.vue') },//分类三级
      { path: "/home/cart", name: "cart", component: () => import('../views/cart/cart.vue') },//购物车
      { path: "/home/Details", name: "Details", component: () => import('../views/Details/Details.vue') },//详情
<<<<<<< HEAD
      { path: "/home/member", name: "member", component: () => import("../views/member/member.vue"),
        children: [
          { path: "", redirect: "/home/member/memright" },
          { path: "/home/member/memright", name: "sub", component: () => import("../views/member/components/memright.vue"),},//个人中心
          { path: "/home/order/order", name: "sub", component: () => import("../views/order/order.vue"),},//订单
        ],
      },//订单页
=======
      { path: "/home/member", name: "member", component: () => import('../views/member/member.vue') },//个人中心
      { path: "/home/accounts", name: "accounts", component: () => import('../views/accounts/accounts.vue') },//结算中心
      { path: "/home/payoff", name: "payoff", component: () => import('../views/payoff/payoff.vue') },//支付订单
>>>>>>> ysh
    ]
  },//商城页
  {
    path: "/login",
    name: "login",
    component: () => import("../views/login/login.vue"),
  }, //登录页
];

const router = new VueRouter({
  routes,
});

export default router;
